﻿using System;
using System.Text;
using IAM.Interface.Model.ENUM;

namespace IAM.Interface.Common.Context
{
    /// <summary>
    /// 传送控制类实体对象
    /// </summary>
    public class ResponseContextModel
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="encryptType">加密类型</param>
        /// <param name="key">密钥</param>
        /// <param name="xml">接收到的xml包</param>
        public ResponseContextModel(
            int encryptType, 
            string key, 
            string xml)
        {
            _encryptType = encryptType;
            _key = key;
            _xml = xml;
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="sign">签名</param>
        /// <param name="encryptType">加密类型</param>
        /// <param name="key">密钥</param>
        /// <param name="xml">接收到的xml包</param>
        public ResponseContextModel(
            string sign,
            int encryptType,
            string key,
            string xml)
        {
            _sign = sign;
            _encryptType = 0;//指定加密类型是RijndaelManaged
            _key = key;
            _xml = xml;
        }
        #region 属性
        private int _encryptType = 0;
        private string _key = "";
        private string _xml = "";
        private string _sign = "";
        /// <summary>
        /// 加密类型
        /// </summary>
        public int EncryptType
        {
            get
            {
                return _encryptType;
            }
            set
            {
                _encryptType = value;
            }
        }
        /// <summary>
        /// 密钥
        /// </summary>
        public string Key
        {
            get
            {
                return _key;
            }
            set
            {
                _key = value;
            }
        }
        /// <summary>
        /// 接收到的xml包
        /// </summary>
        public string XML
        {
            get
            {
                return _xml;
            }
            set
            {
                _xml = value;
            }
        }
        /// <summary>
        /// 签名
        /// </summary>
        public string Sign
        {
            get
            {
                return _sign;
            }
            set
            {
                _sign = value;
            }

        }
        #endregion


    }
}
